package cn.jsu.oj.dispatchServer.mapper;

import cn.jsu.oj.dispatchServer.pojo.dto.TopicSetTopicMaxScore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface TopicSetMapper {
    /**
     * @author: ahtonc
     * @note:   通过表主键获取关联的最高分
     */
    public TopicSetTopicMaxScore getTopicSetTopicMaxScore(@Param("topicSetId") Integer topicSetId,
                                                          @Param("topicId") Integer topicId,
                                                          @Param("topicTypeId") Integer topicTypeId,
                                                          @Param("accountId") Integer accountId);
    /**
     * @author: ahtonc
     * @note:   更新最高分
     */
    public Integer updateTopicSetTopicMaxScore(TopicSetTopicMaxScore score);

    /**
     * @author: ahtonc
     * @note:   第一次提交更新最高分
     */
    public Integer insertTopicSetTopicMaxScore(TopicSetTopicMaxScore score);

    /**
     * @author: ahtonc
     * @note:   通过流水号获取用户ID和题目集ID
     */
    public TopicSetTopicMaxScore getUserIdAadTopicSetIdBySerialNumber(@Param("serialNumber") Long serialNumber);
}
